<style>
    .tpl-transport-lists{
        width: calc(100% - 30px);
        border: 1px solid #ccc;
        overflow: hidden;
        margin: 10px auto 0 auto;
    }
    .tpl-transport-list{

        width: 100%;
        height: auto;
        padding: 5px;
        border-bottom: 1px solid #ccc;
        overflow: hidden;
        line-height: 30px;

    }
    .tpl-transport-list.default{

        background: #e7e7e7;

    }
    .tpl-transport-list:last-child{

        border: none;

    }
    .rlb-no{

        border-left:none !important;
        border-right: none !important;

    }
    .areas{

        width: 20%;

    }
    .first,.first-price,.other,.other-price,.do-action{

        width: 14%;
        margin-left: 10px;


    }

</style>
<div class="col-xs-12 col-md-12 col-lg-12 padding-none lists">
    <?php foreach($data as $v):?>

    <div class="tpl-transport-lists">
        <div class="tpl-transport-list default">
            <div class="pull-left">模板名称: <?php echo $v['title']?></div>
            <div class="pull-right">
                <a href="javascript:;" data-transport_id="<?php echo $v['id']?>" data-transport_name="<?php echo $v['title']?>" class="btn btn-warning edit radius-none use">应用该模板</a>
            </div>
        </div>

        <?php foreach($v['transport'] as $val):?>
        <?php if($val['is_default'] == 1):?>
        <div class="tpl-transport-list default">
            <div class="input-group input-group-sm">
                <span class="input-group-addon radius-none">默认运费:</span>
                <div class="form-control radius-none text-center"><?php echo $val['snum']?></div>
                <span class="input-group-addon radius-none rlb-no">件内,</span>
                <div class="form-control radius-none text-center"><?php echo sprintf("%.2f",($val['sprice'] / 100))?></div>
                <span class="input-group-addon radius-none rlb-no">元,</span>
                <span class="input-group-addon radius-none rlb-no">每增加</span>
                <div class="form-control radius-none text-center"><?php echo $val['xnum']?></div>
                <span class="input-group-addon radius-none rlb-no">件,</span>
                <span class="input-group-addon radius-none rlb-no">增加运费</span>
                <div class="form-control radius-none text-center"><?php echo sprintf("%.2f", ($val['xprice'] / 100))?></div>
                <span class="input-group-addon radius-none">元</span>
            </div>
        </div>

        <div class="tpl-transport-list">
            <div class="areas pull-left">运送到</div>
            <div class="first pull-left">首件(件)</div>
            <div class="first-price pull-left">首费(元)</div>
            <div class="other pull-left">续件(件)</div>
            <div class="other-price pull-left">续费(元)</div>
        </div>
        <?php else:?>
        <div class="tpl-transport-list">
            <div class="areas pull-left">
                <?php echo str_cut($val['county_names'],30,'...')?>
            </div>
            <div class="first pull-left">
                <div class="input-group input-group-sm">
                    <div class="form-control radius-none text-center"><?php echo $val['snum']?></div>
                </div>
            </div>
            <div class="first-price pull-left">
                <div class="input-group input-group-sm">
                    <div class="form-control radius-none text-center"><?php echo sprintf("%.2f", ($val['sprice'] / 100))?></div>
                    <span class="input-group-addon radius-none">元</span>
                </div>
            </div>
            <div class="other pull-left">
                <div class="input-group input-group-sm">
                    <div class="form-control radius-none text-center"><?php echo $val['xnum']?></div>
                </div>
            </div>
            <div class="other-price pull-left">
                <div class="input-group input-group-sm">
                    <div class="form-control radius-none text-center"><?php echo sprintf("%.2f", ($val['xprice'] / 100))?></div>
                    <span class="input-group-addon radius-none">元</span>
                </div>
            </div>
        </div>
        <?php endif;?>
        <?php endforeach;?>
    </div>
    <?php endforeach;?>
</div>
